<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    ul{
      display: flex;
      
    }
    li{
      margin: 20px;
    }
    .active{
      background-color: red;
    }
  </style>
</head>
<body>
  <div class="app">
    <h1 :class="a">我是h</h1>
    <ul>
      <li :class="index==0?a:''" @click="tu(0)">我是第1个li</li>
      <li :class="index==1?a:''" @click="tu(1)">我是第2个li</li>
      <li :class="index==2?a:''" @click="tu(2)">我是第3个li</li>
      <li :class="index==3?a:''" @click="tu(3)">我是第4个li</li>
      <li :class="index==4?a:''" @click="tu(4)">我是第5个li</li>
      <li :class="index==5?a:''" @click="tu(5)">我是第6个li</li>
      <li :class="index==6?a:''" @click="tu(6)">我是第7个li</li>
      <li :class="index==7?a:''" @click="tu(7)">我是第8个li</li>
    </ul>
<img :src="url[index]" alt="">
  </div>
  

<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>
  <script>
  const app = new Vue({
    el:'.app',
    data:{
      url:[
        './imgs/10-01.png',
        './imgs/10-02.png',
        './imgs/11-00.gif',
        './imgs/11-01.gif',
        './imgs/11-02.gif',
        './imgs/11-03.gif',
        './imgs/11-04.png',
        './imgs/11-05.png',
      ],
     index:0,
     a:'active'
    },
    methods:{
      tu(i){
      this.index = i
      }
    }
  })
  </script>
</body>
</html>